import request from '@/utils/request'

// 查询推荐课程记录列表
export function listRecord(query) {
  return request({
    url: '/mobile/userprescription/list',
    method: 'get',
    params: query
  })
}

// 查询推荐课程记录详细
export function getRecord(id) {
  return request({
    url: '/mobile/userprescription/' + id,
    method: 'get'
  })
}

// 新增推荐课程记录
export function addRecord(data) {
  return request({
    url: '/mobile/userprescription',
    method: 'post',
    data: data
  })
}

// 修改推荐课程记录
export function updateRecord(data) {
  return request({
    url: '/mobile/userprescription',
    method: 'put',
    data: data
  })
}

// 删除推荐课程记录
export function delRecord(id) {
  return request({
    url: '/mobile/userprescription/' + id,
    method: 'delete'
  })
}


// 查询某一周的运动处方详细
export function getWeekPrescription(week) {
  return request({
    url: '/mobile/prescription/week/' + week,
    method: 'get'
  })
}

// 查询某个指定分数的运动处方详细
export function getPointPrescription(id) {
  return request({
    url: '/mobile/pointprescription/' + id,
    method: 'get'
  })
}

// 查询所有可选分数
export function listAllPoint() {
  return request({
    url: '/mobile/pointprescription/all',
    method: 'get'
  })
}


// 查询所有可选周次
export function listAllWeek() {
  return request({
    url: '/mobile/prescription/all',
    method: 'get'
  })
}





